import 'package:library_base/entities/generated/json/base/json_convert_content.dart';
import 'package:library_base/entities/order_goods_res_entity.dart';

OrderGoodsResEntity $OrderGoodsResEntityFromJson(Map<String, dynamic> json) {
  final OrderGoodsResEntity shipperEntity = OrderGoodsResEntity();

  final String? goodsName = jsonConvert.convert<String>(json['goodsName']);
  if (goodsName != null) {
    shipperEntity.goodsName = goodsName;
  }

  final String? goodsBarCode = jsonConvert.convert<String>(json['goodsBarCode']);
  if (goodsBarCode != null) {
    shipperEntity.goodsBarCode = goodsBarCode;
  }

  final double? mainWeight = jsonConvert.convert<double>(json['mainWeight']);
  if (mainWeight != null) {
    shipperEntity.mainWeight = mainWeight;
  }

  final double? subWeight = jsonConvert.convert<double>(json['subWeight']);
  if (subWeight != null) {
    shipperEntity.subWeight = subWeight;
  }

  final double? sumWeight = jsonConvert.convert<double>(json['sumWeight']);
  if (sumWeight != null) {
    shipperEntity.sumWeight = sumWeight;
  }

  return shipperEntity;
}

Map<String, dynamic> $OrderGoodsResEntityToJson(OrderGoodsResEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['goodsName'] = entity.goodsName;
  data['goodsBarCode'] = entity.goodsBarCode;
  data['mainWeight'] = entity.mainWeight;
  data['subWeight'] = entity.subWeight;
  data['sumWeight'] = entity.sumWeight;
  return data;
}
